package com.lrkj.back.service.impl;

import java.util.List;
import java.util.Map;

import com.lrkj.back.entity.KcCangku;
import com.lrkj.back.entity.KcChuku;
import com.lrkj.back.entity.KcKucun;
import com.lrkj.back.entity.KcRukun;
import com.lrkj.back.service.KcCangkuService;
import com.lrkj.back.entity.KcChanpin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lrkj.back.mapper.KcCangkuMapper;
import com.lrkj.back.mapper.KcChanpinMapper;
import com.lrkj.back.mapper.KcChukuMapper;
import com.lrkj.back.mapper.KcKucunMapper;
import com.lrkj.back.mapper.KcRukunMapper;
import cn.com.cbons.mamisay.parent.db.api.DBInterface;
import cn.com.cbons.mamisay.parent.exception.DBException;
import cn.com.cbons.mamisay.parent.service.base.ParentServiceImpl;

@Transactional
@Service("kcCangkuService")
public class KcCangkuServiceImpl extends ParentServiceImpl<KcCangku> implements KcCangkuService {

    @Autowired
    private KcCangkuMapper kcCangkuMapper;

    @Autowired
    private KcKucunMapper kcKucunMapper;

    @Autowired
    private KcChanpinMapper kcChanpinMapper;

    @Autowired
    private KcChukuMapper kcChukuMapper;

    @Autowired
    private KcRukunMapper kcRukunMapper;

    @Override
    protected DBInterface<KcCangku> getDao() throws DBException {
        // TODO Auto-generated method stub
        return kcCangkuMapper;
    }

    @Override
    public List<KcCangku> findCangku(Map<String, Object> map) {
        // TODO Auto-generated method stub
        return kcCangkuMapper.findCangku(map);
    }

    @Override
    public List<KcKucun> findKucun(Map<String, Object> map) {

        return kcKucunMapper.findKcKucun(map);

    }

    @Override
    public List<KcChanpin> findChanpin(Map<String, Object> map) {

        return kcChanpinMapper.findChanpin(map);

    }

    @Override
    public List<KcChuku> findChuku(Map<String, Object> map) {

        return kcChukuMapper.findChuku(map);

    }

    @Override
    public List<KcRukun> findRukun(Map<String, Object> map) {

        return kcRukunMapper.findRukun(map);

    }

}
